//
//  XTCaseCollectionViewCell.m
//  BeautifulHome
//
//  Created by dlios on 15-5-14.
//  Copyright (c) 2015年 ACE. All rights reserved.
//

#import "XTCaseCollectionViewCell.h"
#import "UIImageView+WebCache.h"
@implementation XTCaseCollectionViewCell
- (void)dealloc
{
    [_myImageView release];
    [_picName release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.myImageView = [[UIImageView alloc]init];
        
        [self.contentView addSubview:_myImageView];
        [_myImageView release];
    }
    return self;
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _myImageView.frame = CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height );
   
}
- (void)setPicName:(NSString *)picName
{
    if (_picName != picName ) {
        [_picName release];
        _picName = [picName retain];
    }
    [_myImageView sd_setImageWithURL:[NSURL URLWithString:_picName]];
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
